[sensors] Added an 'encoders' level to the velocity sensor#541
[sensors] Added an 'encoders' level to the velocity sensor#541severin-lemaignan wants to merge 1 commit intomorse-simulator:masterfrom
Conversation
|
I'm not sure to see the relation of velocity, for me, it looks like really low-level odometry sensor. add_propery() lines are too long. wheel_base and wheel_radius should probably be robot property, not sensor property. It may be nice also to be able to extend to caterpillars |
|
Also, it would be nice to be able to test at builder time that the sensor is configured properly for an 'differential robot', not a 'standard one'. |
This new abstraction level, that assumes a differential drive robot, returns encoder ticks instead of displacement
|
@adegroote Indeed,
For the |
|
The comment speaks about dtheta, while the code use dw, it is a bit confusing. Considering the unit-test, I think there is several issues. The precision is probably not really good per se, as you basically add a lots of small float. On the other side, the unit-test use a fixed DELTA, while the error definitively increase at each "step". If you want to keep a fixed DELTA, you should probably store last_{left, right}_encoder and compare with them. Concerning DifferentialDriveRobot, PhysicalWheelRobot contains most of the needed logic (if not all). |
This new abstraction level for the velocity sensor that returns encoder ticks instead of linear/angluar speeds
It assumes a differential drive robot as accordingly adds properties to setup wheel radius, wheel base (and encoder resolution).
The current behaviour (linear + angluar speed) is now the (default) 'standard' level.
This pull-request is not ready for merge. I would like first to get feedback on: